<?php
require_once './libries/utilities/function.php';
$path = "../ptnhuan-web1/data/films.txt";
$full_path = realpath($path); //doc duong dan truoc no : C://...
$films = mreadFile($path);

?>
<form method="POST">
<?php for($i = 0;$i < count($films);$i ++){
    $b= trim($films[$i],"\n\t\r ");//cat ja tri nhung dau
    $film = explode(";", $b);
    if($_GET["if"] == $film[0]){
?>
    Name : <input type="text" size="50px"  value="<?php if(!empty($film[2])) echo $film[2]; ?>"></br>
    Rating : <input type="text"  value="<?php if(!empty($film[3])) echo $film[3]; ?>"></br></br>
    <img width="50px" height="80px" src = '../ptnhuan-web1/public/images/films/<?php echo $film[1]; ?>'>
    <textarea rows="5" cols="50" placeholder="Chinh Sua"></textarea>
    <input type="submit" name="submit" value="Save" size="30px;">  
<?php }} ?>
</form>